<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {

	function __construct() {
		parent::__construct();
		//if($this->router->class != "news" and $this->router->method !="search") $this->session->unset_userdata("search");
		$this->lang->load('home', 'vietnamese');
	}

	function index() {

		$data['title']='Trang chủ';
		//$data['main']='homepage';
		$this->load->view('template/index',$data);
	}
	function ajax_gold() {

		$this->load->view('template/ajax_gold');
	}
	function ajax_money() {

		$this->load->view('template/ajax_money');
	}

	function lg($lang) {

		if (!isset($_SESSION)) {
		  session_start();
		}
		if ($lang == "vn") {

			$_SESSION['lang'] = 1;
		} else {
			unset($_SESSION['lang']) ;
		}
		redirect($_SESSION['curr_url'], 'refresh');
	}

}
